﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:System="clr-namespace:System;assembly=mscorlib">

	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="..\Shared.xaml" />
	</ResourceDictionary.MergedDictionaries>

	<!-- Button -->

	<Style x:Key="Button.TransparentWithEffect" TargetType="{x:Type Button}">
		<Style.BasedOn>
			<Style TargetType="Button">
				<Style.Resources>
					<ResourceDictionary />
				</Style.Resources>
				<Setter Property="FrameworkElement.Margin">
					<Setter.Value>
						<Thickness>4,0,4,0</Thickness>
					</Setter.Value>
				</Setter>
				<Setter Property="FrameworkElement.VerticalAlignment">
					<Setter.Value>
						<x:Static Member="VerticalAlignment.Center" />
					</Setter.Value>
				</Setter>
				<Setter Property="FrameworkElement.MinWidth">
					<Setter.Value>
						<System:Double>0</System:Double>
					</Setter.Value>
				</Setter>
				<Setter Property="TextElement.Foreground">
					<Setter.Value>
						<SolidColorBrush>#FFF2AF12</SolidColorBrush>
					</Setter.Value>
				</Setter>
				<Setter Property="TextElement.FontFamily">
					<Setter.Value>
						<FontFamily>Arial</FontFamily>
					</Setter.Value>
				</Setter>
				<Setter Property="TextElement.FontSize">
					<Setter.Value>
						<System:Double>11</System:Double>
					</Setter.Value>
				</Setter>
				<Setter Property="Control.Template">
					<Setter.Value>
						<ControlTemplate TargetType="Button">
							<Grid>
								<Border Name="highlight" BorderBrush="#FFffffff" CornerRadius="3,3,3,3" BorderThickness="1,1,1,1" Background="{StaticResource FlatButtonOver}" Opacity="0">
									<Border.BitmapEffect>
										<OuterGlowBitmapEffect GlowColor="White" GlowSize="3" Noise="0" Opacity="0.5" />
									</Border.BitmapEffect>
								</Border>
								<ContentPresenter Margin="{TemplateBinding Control.Padding}" VerticalAlignment="Center" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" Content="{TemplateBinding ContentControl.Content}" />
							</Grid>
							<ControlTemplate.Triggers>
								<EventTrigger RoutedEvent="Mouse.MouseEnter">
									<BeginStoryboard>
										<Storyboard>
											<Storyboard.Children>
												<DoubleAnimation To="0.7" Duration="00:00:00.2000000" Storyboard.TargetName="highlight" Storyboard.TargetProperty="Opacity" />
											</Storyboard.Children>
										</Storyboard>
									</BeginStoryboard>
								</EventTrigger>
								<EventTrigger RoutedEvent="Mouse.MouseLeave">
									<BeginStoryboard>
										<Storyboard>
											<Storyboard.Children>
												<DoubleAnimation To="0" Duration="00:00:00.2000000" Storyboard.TargetName="highlight" Storyboard.TargetProperty="Opacity" />
											</Storyboard.Children>
										</Storyboard>
									</BeginStoryboard>
								</EventTrigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
		</Style.BasedOn>
	</Style>

</ResourceDictionary>